//
//  FMBaseController.m
//  FreeMark
//
//  Created by gaopr on 2019/2/17.
//  Copyright © 2019年 gaopr. All rights reserved.
//

#import "FMBaseController.h"

@interface FMBaseController ()



@end

@implementation FMBaseController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor fm_colorWithHex:0x38383B];
}

#pragma mark - add
- (void)configAddButton
{
    UIBarButtonItem *publishButtonItem = [[UIBarButtonItem alloc] initWithCustomView:self.addButton];
    UIBarButtonItem *space = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFixedSpace
                                                                           target:nil
                                                                           action:nil];
    space.width = - 20;
    self.navigationItem.rightBarButtonItems = [NSArray arrayWithObjects:space, publishButtonItem, nil];
}

- (UIButton *)addButton
{
    if (!_addButton)
    {
        _addButton = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 64, 64)];
        [_addButton setImage:[UIImage imageNamed:@"add"]
                        forState:UIControlStateNormal];
        [_addButton addTarget:self action:@selector(onAddAction:) forControlEvents:UIControlEventTouchUpInside];
    }
    return _addButton;
}

- (void)onAddAction:(UIButton *)btn
{
    
}

@end
